<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String ip = request.getHeader("x-forwarded-for");
	if (ip == null || ip.length() == 0
			|| "unknown".equalsIgnoreCase(ip)) {
		ip = request.getHeader("Proxy-Client-IP");
	}
	if (ip == null || ip.length() == 0
			|| "unknown".equalsIgnoreCase(ip)) {
		ip = request.getHeader("WL-Proxy-Client-IP");
	}
	if (ip == null || ip.length() == 0
			|| "unknown".equalsIgnoreCase(ip)) {
		ip = request.getRemoteAddr();
	}
%>

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<style>
body {
	padding-top: 60px;
}
</style>
<title>登录</title>
<link href="<%=basePath%>/css/bootstrap.css" rel="stylesheet" />

<link href="<%=basePath%>/css/login-register.css" rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath%>/css/font-awesome.css">

<script src="<%=basePath%>/js/jquery-3.0.0.min.js"
	type="text/javascript"></script>
<script src="<%=basePath%>/js/bootstrap.js" type="text/javascript"></script>
<script src="<%=basePath%>/js/login-register.js" type="text/javascript"></script>
<script src="<%=basePath%>/js/login.js">
	
</script>
<script src="<%=basePath%>/js/angular.min.js"></script>
</head>
<script src="/Terminator/js/toaster.min.js">
	
</script>
<script src="/Terminator/js/angular-animate.min.js">
	
</script>
<link href="/Terminator/css/toaster.min.css" rel="stylesheet" />
<link href="/Terminator/css/bootstrap.min.css" title="" rel="stylesheet" />

<link title="orange" href="/Terminator/css/logintest.css"
	rel="stylesheet" type="text/css" />


</head>

<body id="body" ng-app="myApp" ng-controller="myCtrl">
	<div align="center">
		<toaster-container></toaster-container>
	</div>
	<div style="height: 1px;"></div>
	<div class="login">
		<header>
			<h1>登录</h1>
		</header>
		<div class="sr">
			<form>
				<div class="name">
					<label> <i class="sublist-icon glyphicon glyphicon-user"></i>
					</label> <input type="text" id="username" name="login"
						style="height: 40px; padding: 4px 50px;"
						onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
						maxlength="20" placeholder="请输入用户名" class="form-control">
				</div>
				<div class="name">
					<label> <i class="sublist-icon glyphicon glyphicon-pencil"></i>
					</label> <input type="password" id="password" name="pwdPrompt"
						class="form-control"
						onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
						style="height: 40px; padding: 4px 50px;" maxlength="20"
						placeholder="请输入密码">
				</div>
				<button class="dl" id="login_btn" ng-click='clickk()'>登录</button>
				<div class="modal-footer"
					style="border-top: 1px solid black; padding-top: 10px; padding-bottom: 5px;">
					<p style="text-align: right;">
						还没<a href="" ng-click="openRegisterModal()" class="btn btn-link">注册</a>
						？
					</p>
				</div>
			</form>
		</div>
		<div class="modal fade" id="loginModal"
			style="display: block; width: 352px; height: 462px;">
			<div class="modal-dialog login animated" style="margin-top: 0px;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title">用户注册</h4>
					</div>
					<div class="modal-body">
						<div class="box">
							<div class="content">
								<div class="social">
									<div align="left">
										<select ng-model="juese" class='form-control'
											ng-options="x.roleid as x.rolename for x in roles"
											ng-change='roleChange()'
											style="float: left; color: blue; width: 33%;">
										</select> <select ng-model="bumen" class='form-control'
											ng-options="x.id as x.name for x in deptInfo"
											style="float: left; color: blue; width: 33%;"
											ng-show="isShowbumen">
										</select> <select ng-model="xiangmu" class='form-control'
											ng-options="x.id as x.name for x in projectInfo"
											ng-show="isShowxiangmu"
											style="float: left; color: blue; width: 33%;">
										</select>
									</div>
								</div>
								<div class="division">
									<div class="line l"></div>
									<span>账号信息</span>
									<div class="line r"></div>
								</div>
								<div class="error"></div>
							</div>
						</div>
						<div class="box">
							<div class="content registerBox">
								<div class="form">
									<form method="post" html="{:multipart=>true}"
										data-remote="true" action="/register" accept-charset="UTF-8">
										<input id="usernameRe" class="form-control" type="text"
											placeholder="用户姓名" name="username"> <input
											id="loginnameRe" class="form-control" type="text"
											onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
											placeholder="登录名" name="loginname"> <input
											id="passwordRe" class="form-control" type="password"
											onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
											placeholder="密码" name="password"> <input
											id="password_confirmationRe" class="form-control"
											onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
											type="password" placeholder="重复密码"
											name="password_confirmation"> <input
											class="btn btn-default btn-register" type="button" value="注册"
											name="commit" ng-click='registerClick()'>
									</form>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
</body>
</html>
